package personal.jason.hmm;

import java.util.List;

public interface HMM {

	/**
	 * load the model trained by jason hmm
	 * @param modelPath model path
	 * @return success or not
	 */
	public boolean loadModel(String modelPath);
	
	/**
	 * train model with supervised
	 * @param trainfile
	 * @param outputPath
	 * @return success or not
	 */
	public boolean supervisedLearn(String trainfile, String outputPath);
	
	/**
	 * train model without supervised
	 * @param trainfile
	 * @param outputPath
	 * @return success or not
	 */
	public boolean unSupervisedLearn(String trainfile, String outputPath);
	
	/**
	 * compute the probability of the observation sequence
	 * @param observation
	 * @return probability
	 */
	public double probability(String[] observation);
	
	/**
	 * compute the most possible state sequence of the observation sequence
	 * @param observation
	 * @return the state sequence
	 */
	public List<String> decode(String[] observation);
}
